<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Anstack</title>
        {% load staticfiles %}
        <link rel="shortcut icon" href="{% static 'img/favicon.ico' %}" type="image/x-icon">
        <link rel="stylesheet" href="http://cdn.bootcss.com/font-awesome/4.3.0/css/font-awesome.min.css">
        <link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
        <link rel="stylesheet" href="/static/css/main.css">
    </head>
        {% block head_content %}{% endblock head_content %}
    <body>
    <div class="navbar navbar-inverse" role="navigation">
	    <div class="container">
		    <div class="navbar-header">
			    <a class="navbar-brand" href="/">AnStack</a>
		    </div>
		    <div class="navbar-collapse collapse">
			    <ul class="nav navbar-nav">
				    <li><a href="/">Home</a></li>
			    </ul>

                <ul class="nav navbar-nav navbar-right">
                    {% if customer_name %}
                    <li id="fat-menu" class="dropdown">
                        <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                            {{ customer_name }}
                        </a>
                    </li>
                    {% endif %}

                    {% if account_name %}
                    <li id="fat-menu" class="dropdown">
                        <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                            {{ account_name }}<span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu" aria-labelledby="drop1">
                            <li><a href="/accounts/logout/">Log Out</a> </li>
                        </ul>
                    </li>
                    {% else %}
                    <li id="fat-menu" class="dropdown">
                        <a id="drop1" href="/accounts/login/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                            Login</a>
                    </li>
                    {% endif %}
                </ul>
		    </div>
	    </div>
    </div>
    <div class="container">
    {% if messages %}
        {% for msg in messages %}
            <div class="alert alert-{{msg.level_tag}}" role="alert">
                <button type="button" class="close" data-dismiss="alert">
                   <span aria-hidden="true">x</span>
                </button>
 	        {{msg.message}}
	        </div>
        {% endfor %}
    {% endif %}
        {% block page_content %}{% endblock page_content %}
    </div>
    </body>
    <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    {% load staticfiles %}
    <script type="text/javascript" src="{% static "js/main.js" %}"></script>
</html>